package com.qys.training.biz.auth.service;

import com.qys.training.base.entity.PageEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

public interface FileService {
    /**
     * 文件上传
     *
     * @param file
     */
    void upload(MultipartFile file);

    /**
     * 文件更新
     *
     * @param id
     * @param file
     */
    void update(Long id, MultipartFile file);


    /**
     * 文件下载
     *
     * @param id
     * @param response
     */
    void download(Long id, HttpServletResponse response);

    /**
     * 文件删除
     *
     * @param id
     */
    void delete(Long id);

    /**
     * 查询
     *
     * @param fileName
     * @param minSize
     * @param maxSize
     * @param currentPage
     * @param pageSize
     * @return
     */
    PageEntity select(String fileName, String minSize, String maxSize, Integer currentPage, Integer pageSize);

    /**
     * 压缩包下载
     *
     * @param ids
     * @param response
     */
    void downloadZip(Long[] ids, HttpServletResponse response);
}
